package com.amazon.ags.api;

import java.util.HashMap;
import java.util.Map;

public enum ErrorCode
{
  public static final Map<Integer, ErrorCode> CODE_TO_ERROR = new HashMap()
  {
    private static final long serialVersionUID = -4762006087722277344L;
  };
  private final boolean isError;

  static
  {
    SERVICE_NOT_READY = new ErrorCode("SERVICE_NOT_READY", 2, true);
    IO_ERROR = new ErrorCode("IO_ERROR", 3, true);
    CONNECTION_ERROR = new ErrorCode("CONNECTION_ERROR", 4, true);
    AUTHENTICATION_ERROR = new ErrorCode("AUTHENTICATION_ERROR", 5, true);
    DATA_VALIDATION_ERROR = new ErrorCode("DATA_VALIDATION_ERROR", 6, true);
    ErrorCode[] arrayOfErrorCode = new ErrorCode[7];
    arrayOfErrorCode[0] = NONE;
    arrayOfErrorCode[1] = UNRECOVERABLE;
    arrayOfErrorCode[2] = SERVICE_NOT_READY;
    arrayOfErrorCode[3] = IO_ERROR;
    arrayOfErrorCode[4] = CONNECTION_ERROR;
    arrayOfErrorCode[5] = AUTHENTICATION_ERROR;
    arrayOfErrorCode[6] = DATA_VALIDATION_ERROR;
  }

  private ErrorCode(boolean paramBoolean)
  {
    this.isError = paramBoolean;
  }

  public static ErrorCode fromServiceResponseCode(int paramInt)
  {
    ErrorCode localErrorCode = (ErrorCode)CODE_TO_ERROR.get(Integer.valueOf(paramInt));
    if (localErrorCode == null)
      localErrorCode = UNRECOVERABLE;
    return localErrorCode;
  }

  public boolean isError()
  {
    return this.isError;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.ags.api.ErrorCode
 * JD-Core Version:    0.6.2
 */